<!DOCTYPE html>
<html>
    <head lang="en">
        <meta charset="UTF-8">
        <title>KLIPSE: a simple and elegant online cljs compiler and evaluator</title>
        <link rel='shortcut icon' type='image/x-icon' href='img/klipse.png' />
        <link rel="stylesheet" type="text/css" href="css/codemirror.css">
    </head>
    <body>

<h1>Ocaml</h1>

    <h2>Ocaml transpilation to Javascript</h2>
        <pre>
      <code class="transpile-ocaml">
	let rec fib (n: int): int =
	match n with
	| 0 -> 0
	| 1 -> 1
	| _ -> (fib (n - 1)) + (fib (n - 2))

	let () =
	Js.log (fib 6)
      </code>
    </pre>

        <h2> Ocaml Transpilation to Reason</h2>
    <pre>
      <code class="ocaml-to-reason">
let a x y = x + y
      </code>
    </pre>
    <br/>
	<h1>Reason</h1>
    <h2> Reason Transpilation to Javascript </h2>
    <pre>
      <code class="transpile-reason">
let a = "aa" ++ "bb";
      </code>
    </pre>

    <h2> Reason Transpilation to OCaml</h2>
    <pre>
      <code class="transpile-reason-to-ocaml">
let a = "aa" ++ "bb";
      </code>
    </pre>
    <br/>

    <script>
     window.klipse_settings = {
	     selector_transpile_ocaml: '.transpile-ocaml',
       selector_transpile_reason_3: '.transpile-reason',
	     selector_transpile_reason_3_to_ocaml: '.transpile-reason-to-ocaml',
	     selector_ocaml_to_reason: '.ocaml-to-reason',
     };
    </script>
    <script src="plugin_prod/js/klipse_plugin.min.js"></script>
    </body>
</html>
